/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.sys.service;

import java.util.List;

import com.jeeplus.modules.sys.entity.SysParameter;
import com.jeeplus.modules.sys.mapper.SysParameterMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.service.TreeService;
import com.jeeplus.common.utils.StringUtils;

/**
 * 组织机构Service
 * @author liugf
 * @version 2018-06-12
 */
@Service
@Transactional(readOnly = true)
public class SysParameterService extends TreeService<SysParameterMapper, SysParameter> {

	public SysParameter get(String id) {
		return super.get(id);
	}
	public SysParameter get(SysParameter parameterTree){
		return super.get(parameterTree);
	}
	public List<SysParameter> findList(SysParameter parameterTree) {
		if (StringUtils.isNotBlank(parameterTree.getParentIds())){
			parameterTree.setParentIds(","+parameterTree.getParentIds()+",");
		}
		return super.findList(parameterTree);
	}
	
	@Transactional(readOnly = false)
	public void save(SysParameter parameterTree) {
		super.save(parameterTree);
	}
	
	@Transactional(readOnly = false)
	public void delete(SysParameter parameterTree) {
		super.delete(parameterTree);
	}
	
}